package com.example.win.android_banduyujia.peopleactivity.activity.activity.payactivtiy;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.win.android_banduyujia.R;
import com.example.win.android_banduyujia.peopleactivity.ui.activity.BaseTitleBarActivity;

/**
 * Created by Win on 2015/9/2.
 */
public class AccoutActivity extends BaseTitleBarActivity implements View.OnClickListener {
    private static final String TAG = AccoutActivity.class.getSimpleName();

    private RelativeLayout  LayoutAccout, LayoutPay, LayoutRollout;
    private TextView        mTxtAccout, mTxtPay, mTxtRollout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout_accout_page);

        InitTitles();
        InitViews();
    }

    private void InitTitles() {
        showLeftBackButton();
        setTitle(R.string.layout_text_view_accout);
    }

    private void InitViews() {
        LayoutAccout = (RelativeLayout) findViewById(R.id.layout_linear_item_account_balance);
        LayoutPay = (RelativeLayout) findViewById(R.id.layout_linear_item_view_pay);
        LayoutRollout = (RelativeLayout) findViewById(R.id.layout_linear_item_view_roll_out);

        mTxtAccout = (TextView)findViewById(R.id.title_text_view_account_balance);
        mTxtPay = (TextView)findViewById(R.id.title_text_view_pay);
        mTxtRollout = (TextView)findViewById(R.id.title_text_view_roll_out);

        mTxtAccout.setOnClickListener(this);
        mTxtPay.setOnClickListener(this);
        mTxtRollout.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.title_text_view_account_balance:
                accoutActivity();
                break;
            case R.id.title_text_view_pay:
                 payActivity();
                break;
            case R.id.title_text_view_roll_out:
                 rolloutActivity();
                break;
        }
    }

    private void accoutActivity() {
        startActivity(new Intent(this, AccoutBalanceActivity.class));
    }

    private void payActivity() {

    }

    private void rolloutActivity() {

    }
}
